<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <title>Biblioteca Digital</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8"/>
    <meta http-equiv="content-style-type" content="text/css"/>
    
    <link rel="stylesheet" type="text/css" href="/media/css/stilo.css" />
    
    {% block js %}
    <script src="/media/js/jquery.js" type="text/javascript"></script>
    <script type="text/javascript" language="javascript" charset="utf-8">
        // <![CDATA[
        var $j = jQuery.noConflict();
        
        function popup (url) {
            var win = window.open(url, '', 'height=500,width=800,resizable=yes,scrollbars=yes');
            win.focus();
            return false;
        };
        // ]]>
    </script>
    {% endblock js %}

</head>
<body>

<div id="site">
<div id="topo">
    <h1><a href="/">Biblioteca Digital</a></h1>
</div>


<div id="adm">
{% block adm %}
{% if user.is_authenticated %}
    <p> Bem vindo, {{ user.first_name }}. <a href="{% url bd_adm %}">Administração</a> |
    <a href="{% url bd_perfil %}">Perfil</a> |
    <a href="{% url bd_logout %}">Sair (Logout)</a></p>
{% else %}
    <p><a href="{% url bd_login %}">Login [Administração]</a></p>
{% endif %}
{% endblock adm %}
</div>

<div id="areas_usuario">
{% block areas_usuario %}{% endblock areas_usuario %}
</div>

<div id="conteudo">

<div id="trabalho">
{% block trabalho %}{% endblock trabalho %}
</div>

{% block form-pesquisa %}
<div id="form_pesquisa">
<form method="GET" action="{% url bd_index %}">
    <input type="text" name="pesquisa" {% if object_list_pesquisa %}value="{{ pesquisa }}"{% endif %} maxlength=250/>
    <input type="submit" value="Pesquisar" />
</form>
</div>
{% endblock form-pesquisa %}

{% block resultado-pesquisa %}
{% if object_list_pesquisa %}
<div id="resultados_pesquisa">
{% for object in object_list_pesquisa %}
    <div class="resultado">
        <h4><a href="{{ object.get_absolute_url }}">{{ object.titulo }}</a></h4>
        <p class="resumo_trabalho">{{ object.resumo }}</p>
        <p class="keywords"><strong>Palavras Chave:</strong> {{ object.palavrasChave }}</p>
        <p class="data_publicacao_trabalho"><strong>Publicado em:</strong> {{ object.dataPublicacao|date:"d/m/Y" }}</p>
    </div>
{% endfor %}
</div>
{% endif %}
{% endblock resultado-pesquisa %}
</div>
</div>

</body>
</html>
